#! /bin/sh /usr/share/dpatch/dpatch-run
## 05_shared_full_blas.dpatch by  <david@evans>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.

@DPATCH@
diff -urNad atlas-3.8.3~/makes/Make.lib atlas-3.8.3/makes/Make.lib
--- atlas-3.8.3~/makes/Make.lib	2009-08-23 00:05:10.000000000 -0700
+++ atlas-3.8.3/makes/Make.lib	2009-08-23 00:05:33.000000000 -0700
@@ -82,6 +82,15 @@
 	ar r $@ tmp/*.o
 	rm -rf tmp
 
+atlas/libblas.so: atlas/libblas.a libatlas.so
+	ld $(LDFLAGS) -shared -soname libblas.so -o $@ \
+	   --whole-archive atlas/libblas.a \
+           --no-whole-archive $(F77SYSLIB) -lm -lc
+
+atlas/liblapack.so: atlas/liblapack.a atlas/libblas.so
+	ld $(LDFLAGS) -shared -soname liblapack.so -o $@ \
+	   --whole-archive atlas/liblapack.a \
+           --no-whole-archive -L . -lblas $(F77SYSLIB) -lm -lc
 #
 # Builds one shared lib from all ATLAS files
 #
